/**
 * Copyright (C), 2001-2031, www.bosssof.com.cn
 * FileName: XmlParseStrategy.java
 * Author: YuXingZh
 * Date: 15/5/2024 下午10:07
 * Description:
 * XML
 * History:
 * Date          Author   Version  Desc
 * 2024-01-01    bosssoft  1.0.0   initialize this file
 */
package org.boss.strategy;

/**
 * @className: XmlParseStrategy
 * @description: 解决什么问题： XML解析类
 * @author: YuXingZh
 * @date: 15/5/2024下午10:07
 * @since 1.0
 **/
public class XmlParseStrategy implements ParseStrategy {
    private volatile static XmlParseStrategy XML_PARSE_STRATEGY;

    private XmlParseStrategy() {
        // 私有构造函数
    }

    /*
     * 返回单例
     * @author YuXingZh
     * @date 2024/05/17 08:46
     *
     * @param null
     * @return XmlParseStrategy
     */
    public static XmlParseStrategy getInstance() {
        if (XML_PARSE_STRATEGY == null) {
            synchronized (XmlParseStrategy.class) {
                if (XML_PARSE_STRATEGY == null) {
                    XML_PARSE_STRATEGY = new XmlParseStrategy();
                }
            }
        }
        return XML_PARSE_STRATEGY;
    }

    /*
     * 返回密钥密码
     * @author YuXingZh
     * @date 2024/05/17 08:31
     *
     * @param secret
     * @return java.lang.String
     */
    @Override
    public String parse(String secret) {
        return secret + "98765";
    }
}
